package tests;


import org.testng.annotations.Test;
import org.testng.annotations.AfterMethod;
import static org.junit.Assert.*;


public class DeleteMovieNew extends tests.supers.TestBase{

	@AfterMethod
	public void checkLogin(){

		if(app.getUserHelper().isLoggedIn())
			app.getUserHelper().logout();
	}

	@Test
	public void deleteMovie(){

		app.getUserHelper().loginAs(ADMIN);

		String randomMovieTitle = app.getFilmHelper().ensureHasMovie();

		assertTrue(app.getFilmHelper().deleteMovie(randomMovieTitle));
	}

}
